package com.basics.framework.web.domain;


import com.fasterxml.jackson.annotation.JsonInclude;

import java.io.Serializable;
import java.util.List;

public class TreeSelect implements Serializable {
    private static final long serialVersionUID = 1L;
    private String id;
    private String label;
    private String idPath;
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TreeSelect> children;

    public TreeSelect() {
    }

//    public TreeSelect(AppMenu menu) {
////        this.id = menu.getMenuId();
////        this.label = menu.getMenuName();
////        this.idPath = menu.getIdPath();
////        this.children = (List)menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
////    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLabel() {
        return this.label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public List<TreeSelect> getChildren() {
        return this.children;
    }

    public void setChildren(List<TreeSelect> children) {
        this.children = children;
    }

    public String getIdPath() {
        return this.idPath;
    }

    public void setIdPath(final String idPath) {
        this.idPath = idPath;
    }

}
